from selenium.webdriver.common.by import By
from Base import Base
import time
class Page1(Base):
    login1_loc=(By.XPATH,'/html/body/div[1]/div/div[2]/ul/li[1]/a')

    def login1(self):
        self.click(self.login1_loc)

    username_loc=(By.NAME,'username')

    def username(self,username):
        self.send_keys(self.username_loc,username)

    password_loc=(By.NAME,'password')

    def password(self,password):
        self.send_keys(self.password_loc,password)

    yzm1_loc=(By.XPATH,'//*[@id="theForm"]/div[3]/span[2]/input')

    def yzm1(self):
        self.click(self.yzm1_loc)

    yes1_loc=(By.CLASS_NAME,'finish-btn')

    def yes1(self):
        self.click(self.yes1_loc)

    def test_A3mall_login(self):
        self.open_url('http://10.59.9.14:7003/')
        time.sleep(2)
        self.login1()
        time.sleep(2)
        self.username('17621563671')
        time.sleep(2)
        self.password('Admin888')
        time.sleep(2)
        self.yzm1()
        time.sleep(10)
        self.yes1()
        time.sleep(2)